Engineering Aug 12, 2026 6 min read
Keeping the script under one kilobyte
A tracking script is a tax on every page you ship. Here is how ours stays at 812 bytes, what we left out, and why the size is a promise rather than a boast.
Tomas Reilly
The Current script is 812 bytes after compression. The number is on the homepage because it is a promise: an analytics tool should never be the reason your Largest Contentful Paint got worse. Here is how it stays small.
One request, no library
There is no framework, no fetch polyfill, and no dependency of any kind. The script is one function that reads the page URL, the referrer, and the viewport width, and sends them in a single navigator.sendBeacon call. If the browser does not have sendBeacon it falls back to an image request, which is eleven more bytes.
No cookies, so no cookie code
A surprising amount of a typical analytics script is the machinery of identity: reading a cookie, writing a cookie, checking consent, refreshing an expiry. We do none of that. A visitor is a daily hash of a few request headers, computed on our servers, and the script never has to know who anyone is.
What we deliberately left out
- Session replay. It is heavy, it is invasive, and it is not what most teams actually want.
- Scroll depth. We tried it. Nobody made a decision because of it.
- A queue. If the beacon fails, the visit is lost. We measured the loss at 0.2% and decided that honesty about the number was worth more than a retry buffer.
Web Vitals are a second script
The one thing that would not fit is performance measurement. Collecting LCP, INP, and CLS properly means listening to the PerformanceObserver for the life of the page. So that lives in a second script that loads after the page is idle, only on the sample of visits we need for a stable score. Turn it off and you are back to 812 bytes.
<script defer src="https://cdn.current.example/c.js" data-site="YOUR-SITE"></script>That is the whole install. It has not changed since the first customer, and we intend to keep it that way.
More from the blog
- Aug 28, 2026 Why we count revenue, not pageviews Every analytics tool tells you how many people came. Almost none tell you which of them paid. That gap is the whole reason Current exists.
- Jul 30, 2026 Web Vitals, explained for the people who write the pages Three numbers decide whether Google thinks your page is fast. None of them are the number your developer quotes. A plain-language guide to LCP, INP, and CLS.
- Jul 14, 2026 Current reached $5K in monthly revenue Nine months after launch, two founders, no funding. What worked, what did not, and the exact channels that paid for it, from our own dashboard.